home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / PartMaker 4.4 / PartMaker Documents / SamplePart (C)• / SamplePart (C)•.rsrc / dFRK_5006 < prev    next >
Encoding:
Text File  |  1995-12-14  |  8.8 KB  |  261 lines

  1. #
  2. #    File:        SamplePart.make
  3. #
  4. #    Contains:    Makefile for OpenDoc SamplePartC viewer
  5. #
  6. #    Written by:    Steve Smith
  7. #
  8. #    Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  9. #
  10.  
  11. #---------------------------------------------------------------------------    
  12. # PROJECT VARIABLES
  13. #---------------------------------------------------------------------------    
  14.  
  15. TargetName = SamplePartC
  16. TargetNameILink = {TargetName} (68k)
  17. TargetNamePPCLink = {TargetName} (PPC)
  18. TargetNameFat = {TargetName} (fat)
  19.  
  20. TargetCreatorType = SPVW
  21.  
  22. AdditionalIncludes = -i "{SourceDir}"
  23.  
  24. #---------------------------------------------------------------------------    
  25. # CFM/PEF Version Numbers
  26. #---------------------------------------------------------------------------    
  27. # For detailed instructions on proper CFM/PEF version numbering, see
  28. # Code Fragment Chapter (pg 3-7), Inside Macintosh: PowerPC System Software
  29. #---------------------------------------------------------------------------    
  30.  
  31. CurrentLibraryVersion =        0x01018000        # 1.0 Final
  32. LibraryExportsVersion =        0x00000000        # 0.0
  33. LibraryCodeVersion =        0x00000000        # 0.0
  34.  
  35. #---------------------------------------------------------------------------    
  36. # DIRECTORY DEPENDENCIES
  37. #---------------------------------------------------------------------------    
  38.  
  39. "{TargetDir}"  ƒ "{SourceDir}"
  40. "{ObjectsDir}" ƒ "{SourceDir}"
  41. "{ObjectsDir}" ƒ "{ODUtilsImplDir}"
  42.                 
  43. #---------------------------------------------------------------------------    
  44. # ROOT TARGET
  45. #---------------------------------------------------------------------------    
  46.  
  47. BUILDPPCLINK ƒ ∂
  48.     "{CPrecompiledHeaders}"                ∂
  49.     "{CppPrecompiledHeaders}"            ∂
  50.     "{TargetDir}{TargetNamePPCLink}"    ∂
  51.     "{SourceDir}SamplePart.exp"
  52.  
  53. BUILDREZ ƒ ∂
  54.     "{ObjectsDir}{TargetName}.PPC.rsrc"    ∂
  55.     "{ObjectsDir}{TargetName}.68k.rsrc"
  56.  
  57. BUILDILINK ƒ ∂
  58.     "{CPrecompiledHeaders}"                ∂
  59.     "{CppPrecompiledHeaders}"            ∂
  60.     "{TargetDir}{TargetNameILink}"        ∂
  61.     "{SourceDir}SamplePart.exp"
  62.  
  63. BUILDIDL ƒ ∂
  64.     "{SourceDir}"SamplePart.ih            ∂
  65.     "{SourceDir}"SamplePart.h            ∂
  66.     #"{SourceDir}"SamplePart.c            ∂
  67.     "{SourceDir}"SamplePart.exp
  68.  
  69. BUILDFATLIB ƒ ∂
  70.     "{TargetDir}{TargetNameFat}"            ∂
  71.     "{TargetDir}{TargetNamePPCLink}.xSYM"    ∂
  72.     "{TargetDir}{TargetNameILink}.SYM"
  73.  
  74. #---------------------------------------------------------------------------    
  75. # FILE LIST VARIABLES
  76. #---------------------------------------------------------------------------    
  77.  
  78. SamplePartOBJECTS = ∂
  79.         "{ObjectsDir}SamplePartInit.c.o"    ∂
  80.         "{ObjectsDir}SamplePart.c.o"        ∂
  81.         "{ObjectsDir}SamplePartUtils.c.o"    ∂
  82.         "{ObjectsDir}SamplePartGlobals.c.o"
  83.  
  84. OpenDocUtilityOBJECTS = ∂
  85.     "{ObjectsDir}AltPoint.cpp.o"             ∂
  86.     "{ObjectsDir}AltPoly.cpp.o"             ∂
  87.     "{ObjectsDir}Crawl.cpp.o"                ∂
  88.     "{ObjectsDir}Except.cpp.o"                 ∂
  89.     "{ObjectsDir}FlipEnd.cpp.o"             ∂
  90.     "{ObjectsDir}FocusLib.cpp.o"             ∂
  91.     "{ObjectsDir}ISOStr.cpp.o"                 ∂
  92.     "{ObjectsDir}IText.cpp.o"                 ∂
  93.     "{ObjectsDir}LinkList.cpp.o"             ∂
  94.     "{ObjectsDir}ODDebug.cpp.o"             ∂
  95.     "{ObjectsDir}ODMemory.cpp.o"            ∂
  96.     "{ObjectsDir}ODNew.cpp.o"                ∂
  97.     "{ObjectsDir}ODUtils.cpp.o"                ∂
  98.     "{ObjectsDir}PasclStr.cpp.o"            ∂
  99.     "{ObjectsDir}PlfmFile.cpp.o"            ∂
  100.     "{ObjectsDir}StdTypIO.cpp.o"            ∂
  101.     "{ObjectsDir}StorUtil.cpp.o"            ∂
  102.     "{ObjectsDir}TempObj.cpp.o"                ∂
  103.     "{ObjectsDir}UseRsrcM.cpp.o"             ∂
  104.     "{ObjectsDir}WinUtils.cpp.o"             ∂
  105.             
  106. #---------------------------------------------------------------------------    
  107. # DEPENDENCIES
  108. #---------------------------------------------------------------------------    
  109.  
  110. # --- IDL ---
  111.  
  112. "{SourceDir}"SamplePart.c ƒ        ∂
  113.     "{SourceDir}"SamplePart.idl    ∂
  114.     "{ODIDLIntfDir}"Part.idl
  115.     
  116. "{SourceDir}"SamplePart.ih ƒ    ∂
  117.     "{SourceDir}"SamplePart.h    ∂
  118.     "{SourceDir}"SamplePart.idl    ∂
  119.     "{ODIDLIntfDir}"Part.idl
  120.     
  121. "{SourceDir}"SamplePart.h ƒ        ∂
  122.     "{SourceDir}"SamplePart.idl    ∂
  123.     "{ODIDLIntfDir}"Part.idl
  124.  
  125. # --- SOURCE ---
  126.  
  127. "{ObjectsDir}SamplePart.c.o" ƒ        ∂
  128.     "{CPrecompiledHeaders}"            ∂
  129.     "{SourceDir}SamplePart.c"        ∂
  130.     "{SourceDir}SamplePart.ih"        ∂
  131.     "{SourceDir}SamplePartDef.h"     ∂
  132.     "{SourceDir}SamplePartUtils.h"
  133.  
  134. "{ObjectsDir}SamplePartUtils.c.o" ƒ ∂
  135.     "{CPrecompiledHeaders}"            ∂
  136.     "{SourceDir}SamplePartUtils.c"    ∂
  137.     "{SourceDir}SamplePartUtils.h"
  138.                                 
  139. "{ObjectsDir}SamplePartInit.c.o" ƒ    ∂
  140.     "{CPrecompiledHeaders}"            ∂
  141.     "{SourceDir}SamplePartInit.c"    ∂
  142.     "{SourceDir}SamplePart.h"
  143.  
  144. "{ObjectsDir}SamplePartGlobals.c.o" ƒ    ∂
  145.     "{CPrecompiledHeaders}"            ∂
  146.     "{SourceDir}SamplePartGlobals.c"    ∂
  147.     "{SourceDir}SamplePartGlobals.h"
  148.  
  149. #---------------------------------------------------------------------------    
  150. # BUILD LIBRARIES
  151. #---------------------------------------------------------------------------    
  152.  
  153. # --- 68k Link --- #
  154.  
  155. "{TargetDir}{TargetNameILink}" ƒƒ    {SamplePartOBJECTS}            ∂
  156.                                     {OpenDocUtilityOBJECTS}        ∂
  157.                                     "{SourceDir}SamplePart.exp"
  158.     Echo Linking: {TargetNameILink}
  159.     {LinkTool} ∂
  160.         -export `ConvertExportList "{SourceDir}SamplePart.exp"` ∂
  161.         {ILinkOptions}                ∂
  162.         {ILinkShLibOptions}            ∂
  163.         -init SamplePartCFMInit        ∂
  164.         -vercur {CurrentLibraryVersion}                        ∂
  165.         -verdef {LibraryExportsVersion}                        ∂
  166.         -verimp {LibraryCodeVersion}                        ∂
  167.         {ShLibPreLibraries}            ∂
  168.         {SamplePartOBJECTS}            ∂
  169.         {OpenDocUtilityOBJECTS}        ∂
  170.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  171.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  172.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  173.         "{ODCFMLibrariesDir}OpenDoc Imaging.stub"            ∂
  174.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  175.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  176.         {ShLibPostLibraries}        ∂
  177.         -o "{ObjectsDir}{TargetNameILink}".seg
  178.     If !{Status}
  179.         Echo Building: {TargetNameILink}.SYM
  180.         {SymTool} "{ObjectsDir}{TargetNameILink}".seg.NJ    ∂
  181.                 -o "{TargetDir}{TargetNameILink}".SYM -sym 3.2
  182.         Echo Building: {TargetNameILink}∂'s code∂/data fragment
  183.         MakeFlat "{ObjectsDir}{TargetNameILink}".seg -o "{TargetDir}{TargetNameILink}"
  184.         Echo Copying: {TargetNameILink}∂'s resources
  185.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.68k.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  186.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNameILink}"
  187.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  188.     End
  189.  
  190.  
  191. # --- PowerPC Link ---
  192.  
  193. "{TargetDir}{TargetNamePPCLink}" ƒƒ    {SamplePartOBJECTS}        ∂
  194.                                     {OpenDocUtilityOBJECTS}    ∂
  195.                                     "{SourceDir}SamplePart.exp"
  196.     Echo "Linking: {TargetNamePPCLink}"
  197.     {LinkTool}    ∂
  198.         -export `ConvertExportList "{SourceDir}SamplePart.exp"` ∂
  199.         {PPCLinkOptions}            ∂
  200.         {PPCLinkShLibOptions}        ∂
  201.         -init SamplePartCFMInit        ∂
  202.         -verCur {CurrentLibraryVersion}                        ∂
  203.         -verDef {LibraryExportsVersion}                        ∂
  204.         -verImp {LibraryCodeVersion}                        ∂
  205.         {PPCShLibPreLibraries}        ∂
  206.         {SamplePartOBJECTS}            ∂
  207.         {OpenDocUtilityOBJECTS}        ∂
  208.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  209.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  210.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  211.         "{ODCFMLibrariesDir}OpenDoc Imaging.stub"            ∂
  212.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  213.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  214.         {PPCShLibPostLibraries}                                ∂
  215.         -o "{ObjectsDir}{TargetNamePPCLink}"
  216.     If !{Status}
  217.         Move "{ObjectsDir}{TargetNamePPCLink}" "{TargetDir}"
  218.         if ( `exists "{ObjectsDir}{TargetNamePPCLink}".xcoff != ""` )
  219.             Echo Building: {TargetNamePPCLink}.xSYM
  220.             {SymTool} "{ObjectsDir}{TargetNamePPCLink}".xcoff            ∂
  221.                     {AdditionalIncludes} -i "{ODUtilsImplDir}"            ∂
  222.                     -sym on,3.2 -o "{TargetDir}{TargetNamePPCLink}".xSYM
  223.         end
  224.         Echo Copying: {TargetNamePPCLink}∂'s resources
  225.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.PPC.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  226.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  227.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  228.     End
  229.  
  230. #---------------------------------------------------------------------------    
  231. # REZ STEPS
  232. #---------------------------------------------------------------------------    
  233.  
  234. "{RsrcObjectsDir}{TargetName}.PPC.rsrc"    ƒ                                ∂
  235.                                         "{SourceDir}SamplePart.r"        ∂
  236.                                         "{SourceDir}SamplePartDef.h"    ∂
  237.                                         "{SourceDir}SamplePartVers.h"    ∂
  238.                                         "{SourceDir}SamplePartOtherResources.rsrc"
  239.     Echo Rezzing: {TargetName}.r (for PPC)
  240.     Rez {RezOptions} {ODRezIntf} "{SourceDir}"SamplePart.r -o {targ}
  241.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  242.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  243.     if ( `exists "{TargetDir}{TargetNamePPCLink}" != ""` )
  244.         Echo Copying: {TargetNamePPCLink}∂'s resources
  245.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  246.     end    
  247.  
  248. "{RsrcObjectsDir}{TargetName}.68k.rsrc"    ƒ                                ∂
  249.                                         "{SourceDir}SamplePart.r"        ∂
  250.                                         "{SourceDir}SamplePartDef.h"    ∂
  251.                                         "{SourceDir}SamplePartVers.h"    ∂
  252.                                         "{SourceDir}SamplePartOtherResources.rsrc"
  253.     Echo Rezzing: {TargetName}.r (for 68k)
  254.     Rez -d _68KBUILD_ {RezOptions} {ODRezIntf} "{SourceDir}"SamplePart.r -o {Targ} 
  255.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  256.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  257.     if ( `exists "{TargetDir}{TargetNameILink}" != ""` )
  258.         Echo Copying: {TargetNameILink}∂'s resources
  259.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  260.     end
  261.